Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: epoch notifier #144

Merged
merged 27 commits into from
Nov 12, 2024
Merged

feat: epoch notifier #144

merged 27 commits into from
Nov 12, 2024

Conversation

joanestebanr
Copy link
Contributor

@joanestebanr joanestebanr commented Oct 25, 2024

Description

AggLayer require 1 certificate per network each epoch. So the idea is before closing the current AggLayer epoch send the certificate. To do that we add a new object `

  • Send certificates near end of AggLayer Epoch:
    • Integrate auto-config feature using AggLayer call: interop_getClockConfiguration
    • Receive the new block from another object called: BlockNotifier

Internals

  • Mocks files are generated automatically for all interfaces of aggsender without _mock suffix on filename

Configuration changes:

None of this new fields are mandatory, you can use default ones.

[AggSender]
(...)
BlockFinality = "LatestBlock"
EpochNotificationPercentage = 50
  • BlockFinality: is the point that we check the block to decice the epoch. Currently AggLayer is using latest
  • EpochNotificationPercentage: It generate a new certificate BlocksBeforeEpochEnding blocks after reaching this percentage of epoch. Percent is 0 begining, 100 end

Tests

  • This version have been checked using AggLayer: ghcr.io/agglayer/agglayer:0.2.0-rc.9

@joanestebanr joanestebanr self-assigned this Oct 25, 2024
@joanestebanr joanestebanr marked this pull request as ready for review October 28, 2024 16:07
Base automatically changed from feat/agg-sender to develop October 31, 2024 10:04
@joanestebanr joanestebanr added enhancement New feature or request aggsender labels Oct 31, 2024
@joanestebanr joanestebanr force-pushed the feature/epoch_notifier branch 2 times, most recently from cda1666 to 68f4aaf Compare October 31, 2024 17:22
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joanestebanr joanestebanr force-pushed the feature/epoch_notifier branch from 6836886 to 0b8ba05 Compare November 8, 2024 19:16
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observe some new comments

@joanestebanr joanestebanr merged commit dbc47e1 into develop Nov 12, 2024
10 checks passed
@joanestebanr joanestebanr deleted the feature/epoch_notifier branch November 12, 2024 11:20
joanestebanr added a commit that referenced this pull request Nov 12, 2024
* feat: unpack and log agglayer errors (#158)

* feat: unpack and log agglayer errors

* feat: agglayer error unpacking

* fix: lint and UT

* feat: epoch notifier (#144)

- Send certificates after a percentage of epoch
- Require epoch configuration to AggLayer
- Change config of `aggsender` adding: `BlockFinality` and `EpochNotificationPercentage`

* refact: GetSequence method (#169)

* feat: remove sanity check (#178) (#179)

---------

Co-authored-by: Goran Rojovic <100121253+goran-ethernal@users.noreply.github.com>
Co-authored-by: Rachit Sonthalia <54906134+rachit77@users.noreply.github.com>
Co-authored-by: Toni Ramírez <58293609+ToniRamirezM@users.noreply.github.com>
Vui-Chee added a commit to okx/xlayer-cdk that referenced this pull request Dec 3, 2024
* tag 'v0.5.0-beta6':
  feat: write on database the number of retries per certificate and the certificates in a history table (0xPolygon#208)
  feat: return an error in case agglayer returns certificate with height lower than in local storage (0xPolygon#209)
  chore: simplify the `HashMeddler` (0xPolygon#205)
  fix: clean proof table on start (0xPolygon#207) (0xPolygon#210)
  feat: improve logs (0xPolygon#204)
  fix: cdk603 error calculating previousLocalExitRoot (0xPolygon#199)
  fix: Integration Bali PP (0xPolygon#198)
  feat: check agglayer certificate and use as initial if db is empty (0xPolygon#192)
  feat: sqlite aggregator (0xPolygon#189)
  feat: BridgeMessage e2e test (0xPolygon#184)
  feat: aggsender e2e (0xPolygon#183)
  fix: aggregating proofs (0xPolygon#191) (0xPolygon#193)
  feat: l1infotreesync can be run as individual component (0xPolygon#188)
  fix: l1infotree flaky test (0xPolygon#182)
  fix: `L1InfoRootIncorrect` error from `agglayer` (0xPolygon#185)
  feat: improve aggsender logs (0xPolygon#186) (0xPolygon#187)
  feat: remove sanity check (0xPolygon#178) (0xPolygon#179)
  refact: GetSequence method (0xPolygon#169)
  feat: epoch notifier (0xPolygon#144)
  feat: unpack and log agglayer errors (0xPolygon#158)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants